# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=nitrokey-app2
pkgver=2.1.4
pkgrel=0
pkgdesc="Nitrokey management application"
url="https://github.com/Nitrokey/nitrokey-app2"
# s390x, ppc64le and riscv64 blocked by py3-spsdk -> py3-pynitrokey
arch="noarch !s390x !ppc64le !riscv64"
license="Apache-2.0"
depends="
	py3-pynitrokey
	py3-qt-material
	py3-qt5
	py3-udev
	"
makedepends="
	py3-flit-core
	py3-gpep517
	py3-installer
	py3-setuptools
	"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/Nitrokey/nitrokey-app2/archive/refs/tags/v$pkgver.tar.gz"
options="!check" # No tests

build() {
	make build-ui
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
cc2f9edbd6e7d76c025d047eb470f64c8e62e75dc13695b86bdac6ebe8803343de1d29ab16b59492be08e9ef5eb039c0e6109268b8e64c1cd90613b2e872116c  nitrokey-app2-2.1.4.tar.gz
"
